Skip to content

Fix permission_mode propagation and isolate iteration checkpoints by build id#20

Merged
AbirAbbas merged 2 commits intoAgent-Field:mainfrom
RuneLabs-ai:fix/ODIN-138-coding-loop-resume-gating
Feb 26, 2026
Merged

Fix permission_mode propagation and isolate iteration checkpoints by build id#20
AbirAbbas merged 2 commits intoAgent-Field:mainfrom
RuneLabs-ai:fix/ODIN-138-coding-loop-resume-gating

Conversation

@FlibbertyGibbitz
Copy link
Copy Markdown

TL;DR

Two small fixes to make coding-loop execution deterministic across builds:

  • Fix 1: permission_mode is now propagated from build config into coder/reviewer/QA/synthesizer calls.
  • Fix 2: iteration checkpoint files are now scoped by build_id to prevent stale resume state leaking between builds.

Included tests

  • test_run_coding_loop_propagates_permission_mode_to_all_agents
  • test_run_coding_loop_ignores_legacy_iteration_state_when_build_id_present

Validation

  • AGENTFIELD_SERVER=http://localhost:9999 pytest -q tests/test_coding_loop_regressions.py (2 passed)
  • ruff check on touched files (clean)

Summary

This PR fixes two execution-loop issues that can cause inconsistent behavior across builds:

  1. permission_mode from build config was not being propagated into coding-loop agent calls.
  2. Iteration checkpoints were keyed only by issue name, so stale state from prior builds could be resumed unintentionally.

Changes

  • Propagate permission_mode through execution config plumbing:
    • Include permission_mode in BuildConfig.to_execution_config_dict().
    • Use config.permission_mode in coder/reviewer/QA/synthesizer calls.
  • Scope iteration checkpoints by build:
    • Checkpoint path now supports execution/iterations/<build_id>/<issue>.json.
    • Load/save checkpoints using dag_state.build_id.
  • Add regression tests for permission-mode propagation and stale-state isolation.

Why this is safe

  • Existing behavior is preserved when no build_id is available (fallback path still exists).
  • Resume behavior for the same build is unchanged.
  • Changes are isolated to execution config plumbing + coding loop checkpoint pathing.

@AbirAbbas AbirAbbas merged commit 1536444 into Agent-Field:main Feb 26, 2026
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants